<template>
  <div>
    <el-row class="container">
      <el-col :span="8" class="img">
        <img src="@/assets/images/logo.png" alt="logo" />
      </el-col>
      <el-col :span="16" class="el-menu-col">
        <el-menu mode="horizontal" @select="handleSelect" :collapse="isCollapse">
          <el-menu-item index="1">首页</el-menu-item>
          <el-menu-item index="2">客户管理</el-menu-item>
          <el-menu-item index="3">账户管理</el-menu-item>
         
        </el-menu>
      </el-col>
      <el-col :span="8" class="dropdown">
        <el-dropdown>
          <span>{{name}}</span>
          <i class="el-icon-setting" style="margin-right: 15px"></i>
          <span>{{name2}}</span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item>
              <el-button class="button-pass" @click="forgetPass" style="border:none;">修改密码</el-button>
            </el-dropdown-item>
            <el-dropdown-item class="button-pass login">注销登录</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </el-col>
    </el-row>
  </div>
</template>


<script>
export default {
  data() {
    return {
      name: "张三",
      name2: "张飞",
      isCollapse: false
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log("L0====" + key + "--------" + keyPath);
      if (key === "1") {
        this.$router.push("/Layout/Home");
      } else if (key == "2") {
        // this.$router.push("/Customer");
      } else if (key == "3") {
      }
      this.$emit("getSidebar", key); //将值绑定到getSidebar上传递过去
    },
    forgetPass() {
      this.$router.push("/text");
    }
  }
};
</script>

<style rel='stylesheet/scss' lang="scss" scoped>
@import "src/style/min.scss";
.login {
  color: #fff000;
 
}
.el-menu {
  border-bottom: 0px !important;
}
</style>